package net.jiastudy.biz.targettask.service;

import com.baomidou.mybatisplus.plugins.Page;
import net.jiastudy.biz.datasync.TaskImporter;
import net.jiastudy.biz.sys.entity.Dept;
import net.jiastudy.biz.targettask.entity.*;
import org.springframework.data.domain.Sort;

import java.util.List;
import java.util.Map;

public interface TargetTaskService {
    public TaskYear createTaskYear(TaskYear taskYear);

    public void createTargetTasks(TargetTask targetTask);

    public TaskYear updateTaskYear(TaskYear taskYear);

    public TaskYear getTaskYearByCode(String code);

    public boolean deleteTaskYear(Long id);

    public Boolean deleteTask(Long taskId);

    public TaskYear getTaskYear(Long yearId);

    public Page<TaskYear> searchTaskYears(Page<TaskYear> page, Map<String, String> conditions, Sort sort);

    public List<TaskYear> findAllTaskYears();

    public TargetTask createTargetTask(TargetTask targetTask);

    public TargetTask updateTargetTask(TargetTask targetTask);

    public TargetTask passTargetTask(Long id);

    public TargetTask cancelPassTargetTask(Long id);

    public List<TargetTaskTree> getTaskTree(Long yearId);

    public TargetTask getTargetTask(Long id);

    public YearTaskTree getYearTaskTree(Long yearId);

    public List<TargetTask> findTargetTasksByParentIdAndYear(Long parentId, Long year);

    public List<TargetTask> findTargetTasksByDeptIdAndYear(Long deptId, Long year);

    public List<TargetTask> findTargetTasksByReceiveDeptIdAndOriginatedDeptIdAndYear(Long receiveDeptId, Long originatedDeptId, Long year);

    public List<TaskReportVo> getTaskReportByYearAndDeptId(Long year, Long deptId);

    public List<TaskReportVo> getTaskReportByReceiveDeptIdAndOriginatedDeptIdAndYear(Long receiveDeptId, Long originatedDeptId, Long year);

    public List<TaskReportVo> getTaskReportByTasks(List<TargetTask> tasks, String type);

    public List<Dept> findAssessmentDeptsByAssessmentedDeptIdAndYearId(Long deptId, Long yearId);

    public void importTasks(List<TaskImporter> list);

    public List<TargetTask> findTasksByYear(Long year);

    List<TargetTask> findTaskSummary(Map<String, Object> conditions);

    public List<TargetTask> findAllTargetTask();

    public void taskDrag(List<TaskDrag> taskDrags);
    
    public boolean batchPassTargetTasks(Long id);
    
    public boolean batchCancelPassTargetTasks(Long id);
}
